﻿using SeaBattle.Domain.Entities;
using System.Collections;
using System.Collections.Generic;

namespace SeaBattle.Domain.Abstract
{
    public interface IGameRepository
    {
        /// <summary>
        /// creates new game instance with creator player specified
        /// </summary>
        /// <param name="creator">creator player</param>
        /// <returns>created game instance</returns>
        Game CreateNewGame(Player creator);

        /// <summary>
        /// saves current game instance in the storage
        /// </summary>
        /// <param name="game">game instance</param>
        /// <returns>successful saving flag</returns>
        bool SaveGame(Game game);

        /// <summary>
        /// Loads the game.
        /// </summary>
        /// <param name="id">The id.</param>
        /// <returns></returns>
        Game GetGame(int id);

        /// <summary>
        /// Gets games collection;
        /// </summary>
        /// <returns></returns>
        IEnumerable<Game> GetAllGames();
    }


}


